//
//  WeakScriptMessageDelegate.swift
//  ezyform
//
//  Created by Moennig Q on 13/8/2022.
//  Copyright © 2022 Client.Solution Pty Ltd. All rights reserved.
//

import Foundation
import WebKit
class WeakScriptMessageDelegate: NSObject, WKScriptMessageHandler{
    weak var scriptDelegate: WKScriptMessageHandler?
    init(_ delegate: WKScriptMessageHandler) {
        self.scriptDelegate = delegate
        super.init()
    }
    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
        self.scriptDelegate?.userContentController(userContentController, didReceive: message)
    }
    
}
